package com.ruibang.glass.material.constant;


public enum MaterialStatusCode {

    NEW_STATUS(10001, "未查询到该A型架与水平托盘容器数据"),
    USING_STATUS(10002, "未查询到该A型架与水平托盘容器数据"),
    OVER_STATUS(10003, "未查询到该A型架与水平托盘容器数据"),
    OVER_STATUS_IS_EMPTY(100014, "库存未查询到当前水平托盘库存"),
    ADD_FAIL_OUT(1000003, "新增失败！请检查库存"),
    SEARCH_FAIL_NO_CODE(1000004, "查询失败！未携带模块区分Code"),
    ADD_SUCCESS_OUT(1000000, "新增成功"),
    NO_PRODUCT_CODE(1000006, "更新失败！暂无商品编号"),
    NO_A_TYPE_NUMBER(10000014, "水平架为空！请检查是否输入正确的水平架"),
    NO_A_TYPE_LIST_NUMBER(10000015, "物料信息列表中！有物料暂无托盘 ！请检查物料信息"),
    NO_PRODUCT_BY_WARE_HOUSE(1000007, "出库失败！暂无库存"),
    WARE_HOUSE_QUALITY_LESS_USE_QUALITY(1000007, "库存数量小于出库选择数量"),
    DELETE_APPROVE_OVER(1000099, "删除数据中存在流程正在审批中数据！暂时无法删除"),
    NO_ITEM(1000014, "此条流程暂无关联物料"),
    NO_USEING_PRODUCT(1000011, "物料表暂无此数据 ！请检查物料表"),
    NO_MATERIAL_QUALITY(1000014, "库存中暂无数据,请检查库存"),
    NO_IN_QUALITY_NUMBER(1000008, "入库数量为空"),
    NO_PROCESS_ENDING(1000009, "流程暂未结束！暂时无法入库"),
    WAREHOUSE_LESS_IN_WAREHOUSE(1000010, "调拨厂库数量小于需要调拨的数量！请调整数量"),
    BALANCE_NO_DATE(1000013, "结存报表月份日期为空"),
    USE_QUALITY_LESS_OUT_USE(1000019, "可用数量小于出库数量！请稍后再试"),
    NO_USE_QUALITY(1000020, "可以数量为空"),
   ;
    private int code;
    private String msg;

    MaterialStatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }

    public static String getValue(int code) {
        for (MaterialStatusCode ele : values()) {
            if (ele.getCode() == code) return ele.getMsg();
        }
        return null;
    }
}
